// PersistentObjectVisitor.h: interface for the PersistentObjectVisitor class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PERSISTENTOBJECTVISITOR_H__DAAA8854_50E0_4D1C_9A32_A54D7A53C65A__INCLUDED_)
#define AFX_PERSISTENTOBJECTVISITOR_H__DAAA8854_50E0_4D1C_9A32_A54D7A53C65A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Volume;
class Joint;
class SupportHanger;
class Part;

#include "SmallObject.h"

#define PersistentObjectOperation PerObjOper
namespace PersistentObjectOperation
{
/*	template
		<
		typename Visitable,
		typename ReturnType = BOOL
		>
	class DllExport UeVisitor : virtual public Object_
	{
		UE_TEMPLATE_DECLARE_DYNAMIC(UeVisitor);
	public:
		virtual ReturnType Visit(Visitable& v) = 0;
	};
	
#define UeVisitorPre template <typename Visitable, typename ReturnType>
#define UeVisitorSuf <Visitable, ReturnType>
	UE_TEMPLATE_IMPLEMENT_DYNAMIC(UeVisitorPre,
		UeVisitorSuf,
		UeVisitor, Object_);

	typedef UeVisitor<Part*> PartVisitor;
	typedef UeVisitor<Volume*> VolumeVisitor;
	typedef UeVisitor<SupportHanger*> SHVisitor;
	typedef UeVisitor<Joint*> JointVisitor;
*/

#define UE_DECLARE_VISITOR(visitor_name, visitable_type, return_type)\
	class DllExport visitor_name\
	{\
	UE_BASE_DECLARE_DYNAMIC(visitor_name);\
public:\
	visitor_name(){}\
	~visitor_name(){}\
\
public:\
	virtual return_type Visit(visitable_type& v) = 0;\
	};

#define UE_IMPLEMENT_VISITOR(visitor_name)\
	UE_BASE_IMPLEMENT_DYNAMIC(visitor_name)
	
	class DllExport PersistentObjectVisitor : virtual public Object_ 
	{
		UE_DECLARE_DYNAMIC(PersistentObjectVisitor);
	public:
		PersistentObjectVisitor();
		virtual ~PersistentObjectVisitor();
	};
}
#endif // !defined(AFX_PERSISTENTOBJECTVISITOR_H__DAAA8854_50E0_4D1C_9A32_A54D7A53C65A__INCLUDED_)
